import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import AppFunc from "./AppFunc";
import AppMiddleware from "./AppMiddleware";
import AppSaga from "./AppSaga";
// import reportWebVitals from './reportWebVitals';
// import { Provider } from "react-redux";
import { Provider } from "./redux/react-redux";
import store from "./store";
// import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
// import { HashRouter as Router, Switch, Route } from "react-router-dom";
import { HashRouter as Router, Route } from "./react-router-dom/index";
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
  <React.StrictMode>
    <Provider store={store}>
      {/* <App /> */}
      {/* <AppFunc /> */}
      {/* <AppHook></AppHook> */}
      <Router>
        {/* <Switch> */}
          <Route path="/" component={App} exact />
          <Route path="/func" component={AppFunc} />
          <Route path="/middleware" component={AppMiddleware} />
          <Route path="/saga" component={AppSaga} />
        {/* </Switch> */}
      </Router>
    </Provider>
  </React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
// reportWebVitals();
